<template>
  <div>
    <!-- 搜索 -->
    <van-search
      @focus="$router.push('/search')"
      v-model="value"
      placeholder="同学们,学习使你更快乐"
    />
    <!-- 课程导航 -->
    <van-tree-select
      height="55vw"
      :items="items"
      :main-active-index.sync="active"
    >
      <template #content>
        <van-image
          v-if="active === 0"
          src="https://img01.yzcdn.cn/vant/apple-1.jpg"
        />
        <van-image
          v-if="active === 1"
          src="https://img01.yzcdn.cn/vant/apple-2.jpg"
        />
      </template>
    </van-tree-select>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value: "",
      active: 0,
      items: [{ text: "分组 1" }, { text: "分组 2" }],
    };
  },
  methods: {},
  computed: {},
};
</script>
<style lang="scss"  scoped>
/* 课程侧边栏 */
/deep/.van-sidebar {
  height: 600px;
}
</style>
